<template>
    <div class="footer">
        <div class="item">
            <!-- 使用 active-class 替代 active_class -->
            <router-link to="/home" class="nav_item" active-class="nav_color">
                <van-icon name="shop" size="30"/>
            </router-link>
        </div>

        <div class="item">
            <router-link to="/cart" class="nav_item" active-class="nav_color">
                <van-icon name="shopping-cart" size="30"/>
            </router-link>
        </div>

        <div class="item">
            <router-link to="/Order" class="nav_item" active-class="nav_color">
                <van-icon name="todo-list" size="30"/>
            </router-link>
        </div>

        <div class="item">
            <router-link to="/my" class="nav_item" active-class="nav_color">
                <van-icon name="manager" size="30"/>
            </router-link>
        </div>
    </div>
</template>

<style scoped>
.footer {
    display: flex;
    font-size: 12px;
    position: fixed;
    background-color: antiquewhite;
    border-top: 0.5px solid #eee;
    width: 100%;
    bottom: 0;
}

.item {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 10px;
}

.nav_item {
    display: flex;
    flex-flow: column;
    align-items: center;
}

.nav_color {
    color: #ffc400;
}
</style>

